import QtQuick 1.0
import "../Delegates"


ListView {
    id: _rootListView
    x: 0
    y: 0
    height: parent.height
    width: parent.width

    clip: true      //これをしないと下へスクロールする時にアクションバーに食い込む


    delegate: Delegate{
        id: _delegate
        width: _rootListView.width

        itemIndex: _index
        itemTitle: ""
        itemMessage: _title
        itemInformation: ""
        iconVisible: false

        onClicked: {
            //次の動作
            switch(prevPressedButtons){
            case Qt.LeftButton:
                switch(itemIndex){
                case 0:
                    //timeline
    //                    _container.getTimeline();
                    _contentContainer.state = "Timeline";
                    break;
                case 1:
                    //mentions
                    _contentContainer.state = "Mention";
                    break;
                case 2:
                    //DM
                    _contentContainer.state = "DirectMessage";
                    break;
                case 3:
                    //Lists
                    _contentContainer.state = "ListLists";
                    break;
                case 4:
                    //Search
                    break;
                case 5:
                    //Retweets
                    _contentContainer.state = "Retweets";
                    break;
                case 6:
                    //Friends
                    _contentContainer.state = "Friends";
                    break;
                case 7:
                    //Followers
                    _contentContainer.state = "Followers";
                    break;
                case 8:
                    //Favorites
                    _contentContainer.state = "Favorites";
                    break;

                default:
                    break;
                }

                break;
            case Qt.RightButton:
                break;
            default:
                break;
            }
        }
    }
}
